# -*- coding:utf-8 -*-
# 北梦测教育
# 课程咨询加微信：xiaobeiceshi
# 该文件处理所有的需要管理路径
import os
from datetime import datetime


def root_path():
    """获取根目录"""
    root_path = os.path.dirname(os.path.dirname(os.path.realpath(__file__)).replace('\\', '/'))
    return root_path


def get_excel_file():
    """获取excel文件路径"""
    return root_path() + "/data/测试用例完整版.xlsx"


def get_report_path():
    """获取报告的json路径"""
    return root_path() + "/report/html_report/widgets/summary.json"


def get_env_path():
    """获取环境配置路径"""
    return root_path() + "/config/environment.ini"


def get_msg_path():
    """获取消息通知路径"""
    return root_path() + "/config/message.ini"


def get_slow_api_path():
    """慢接口存放的路径"""
    name = datetime.now().strftime("%Y-%m-%d %H_%M_%S")
    return root_path() + f"/slow_api/{name}api_request.csv"


def get_mock_data_path():
    """mock服务的数据文件存储路径"""
    return root_path() + "/mock_server/mock_data.json"
